home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / evaluate / evaluate.h < prev    next >
Text File  |  2000-02-28  |  710b  |  14 lines

  1. /* evaluate.h (C) 2000 Kyzer/CSG.
  2. /* Released under the terms of the GNU General Public Licence version 2. */
  3.  
  4. int Calculate(char *string, long *intres, double *realres, int *error);
  5.  
  6. #define RESULT_OK               0       /* all OK                       */
  7. #define ERROR_SYNTAX            2       /* invalid expression           */
  8. #define ERROR_VARNOTFOUND       3       /* variable not found           */
  9. #define ERROR_NOMEM             8       /* not enough memory available  */
  10. #define ERROR_DIV0              9       /* division by zero             */
  11.  
  12. #define RESULT_INTEGER          0       /* result was an integer        */
  13. #define RESULT_REAL             1       /* result was a real            */
  14.